<?php
defined('BASEPATH') or exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html lang="en">

<head>
	<!--加载header文件-->
	<?php
	include_once 'public/views/header.php';
	include_once 'public/home/html/laydate.php';
	include_once 'public/home/html/alert.php';
	?>
	<?php
	include_once 'public/home/html/faltSelect.php';
	include_once 'public/home/html/ueditor.php';
	?>
	<link rel="stylesheet" href="public/css/edit.css" />
	<link rel="stylesheet" href="public/css/ImgUpload.css" />

	<script src="cust/js/tableEdit5.js"></script>
	<script src="public/js/cus_modal.js"></script>
	<script src="public/js/autoTextarea.js"></script>
	<script src="public/home/js/function.js"></script>
	<script src="cust/js/goodsUpload.js"></script>
	<script src="cust/js/fileUpload.js"></script>

	<style>
		body {
			background-color: white;
		}

		input {
			width: 150px;
		}

		.student-tr input {
			width: 100px;
		}

		.add-icon {
			font-size: 20px;
			color: #1FC91C;
			position: relative;
			top: 3px;
			cursor: pointer;
		}

		.del-icon {
			font-size: 20px;
			color: #dd2727;
			margin-left: 10px;
			position: relative;
			top: 3px;
			cursor: pointer;
		}
	</style>
</head>

<body>
	<input type="file" id="document-file" style="display: none;" multiple="multiple">
	<!-- 各种资料demo -->
	<div class="data-box-demo hide">
		<div class="data-box data-box-banner">
			<i class="icon-remove-sign  del-icon" onclick="delDocument(this)"></i>
			<a href="" download=""><img src="" alt="" class="document-img"></a>
			<input type="hidden" class="path">
			<input type="hidden" class="icon">

			<!-- 前后 -->
			<div class="banner-prev" onclick="bannerPrev(this)"><i class="fa fa-angle-left" aria-hidden="true"></i></div>
			<div class="banner-next" onclick="bannerNext(this)"><i class="fa fa-angle-right" aria-hidden="true"></i></div>
		</div>
	</div>
	<table class="student-demo hide">
		<tr class="student-tr">
			<td colspan="2"><input type="text" name="student_class_name[]" class="student_class_name" value=""></td>
			<td colspan="2"><input type="text" name="student_name[]" class="student_name" value=""></td>
			<td colspan="2" style="min-width: 200px;"><input style="width:150px;" type="text" name="contact_phone[]" class="contact_phone" value=""><i class="icon-remove-sign del-icon" onclick="delStudent(this)"></i></td>
		</tr>
	</table>
	<div class="container">
		<div class="row">
			<input type="hidden" id="modal_title" value="<?= $title ?>" />
			<input type="hidden" id="smodal_height" value="450" />
			<h3 class="title-page"><?= $title ?></h3>
			<form id="editForm">
				<input type="hidden" id="id" name="id" value="<?= estr($detail, 'id') ?>" />
				<input type="hidden" id="folder_id" name="folder_id" value="<?php echo $folder_id; ?>" />
				<table class='edit_table'>
					<tr>
						<th class="required" colspan="2">巡查部门</th>
						<td colspan="2">
							<input class="edit-page" type="text" name="teacher_dept_name" id="teacher_dept_name" value="<?php echo isset($detail['teacher_dept_name']) ? estr($detail, 'teacher_dept_name') : $self['dept_name'] ?>" dataType="*" />
							<div class="print-page"><?php echo isset($detail['teacher_dept_name']) ? estr($detail, 'teacher_dept_name') : $self['dept_name'] ?></div>
						</td>
						<th class="required" colspan="1">巡查人员</th>
						<td colspan="2">
							<input class="edit-page" style="width:90%;" type="text" name="username" id="username" value="<?= estr($detail, 'username') ?>" dataType="*" />
							<!-- <?php if (estr($detail, 'id')) : ?>
								<?= estr($detail, 'username') ?>（<?= estr($detail, 'usercode') ?>）
							<?php else : ?>
								<?php echo getSess()['username'] ?>（<?= getSess()['usercode'] ?>）
							<?php endif ?> -->
						</td>
					</tr>
					<tr>
						<th class="required"  colspan="2">巡查同行人员</th>
						<td colspan="2">
							<input class="edit-page" style="width:90%;" type="text" name="fraternity" id="fraternity" value="<?= estr($detail, 'fraternity') ?>" dataType="*" />
							<div class="print-page"><?= estr($detail, 'fraternity') ?></div>
						</td>
					

						<th class="required"  colspan="1">巡查时间</th>
						<td colspan="2">
							<input class="outline-none" type="text" name="sub_time" id="sub_time" value="<?php echo isset($detail['sub_time']) ? date('Y-m-d', estr($detail, 'sub_time')) : '' ?>" dataType="*" />
						</td>
					</tr>
					<tr>
						<th class="required" colspan="2">单位名称</th>
						<td colspan="6">
							<input class="edit-page" style="width:90%;" type="text" name="unit_name" id="unit_name" value="<?= estr($detail, 'unit_name') ?>" dataType="*" />
							<div class="print-page"><?= estr($detail, 'unit_name') ?></div>
						</td>
					</tr>
					<tr>
						<th class="required" colspan="2">单位地址</th>
						<td colspan="6">
							<input class="edit-page" style="width:90%;" type="text" name="unit_address" id="unit_address" value="<?= estr($detail, 'unit_address') ?>" dataType="*" />
							<div class="print-page"><?= estr($detail, 'unit_address') ?></div>
						</td>
					</tr>
					<tr>
						<th class="required" colspan="2">单位联系人</th>
						<td colspan="3">
							<input class="outline-none" type="text" name="unit_contact" id="unit_contact" value="<?= estr($detail, 'unit_contact') ?>" dataType="*" />
						</td>
						<th class="required" colspan="1">单位电话</th>
						<td colspan="2">
							<input class="outline-none" type="text" name="unit_phone" id="unit_phone" value="<?= estr($detail, 'unit_phone') ?>" dataType="*" />
						</td>
					</tr>
					<tr>
						<th class="required" colspan="8" style="height:30px;">实习巡查任务</td>
					</tr>
					<tr>
						<td colspan="8" style="height:150px;">
							<script id="editor" type="text/plain" style="height:300px; width:100%;"></script>
							<textarea name="task" id="task" cols="30" rows="10" style="width:100%;"><?php echo $detail['task']; ?></textarea>
						</td>

						<!-- 	<td colspan="8" style="height:150px;">
								<textarea class="outline-none" name="task" id="task" style="height:100%; width:100%; resize: none;"><?= estr($detail, 'task') ?></textarea>
							</td> -->
					</tr>
					<tr>
						<th class="required" colspan="1">布置巡查领导签名</th>
						<td colspan="3">
							<input class="outline-none" type="text" name="leader_name" id="leader_name" value="<?= estr($detail, 'leader_name') ?>" />
						</td>
						<th class="required" colspan="2">时间</th>
						<td colspan="2">
							<input class="outline-none" type="text" name="task_time" id="task_time" value="<?php echo isset($detail['task_time']) ? date('Y-m-d', estr($detail, 'task_time')) : '' ?>"  />
						</td>
					</tr>

					<!-- 学生部分 -->
					<tr class="student-title-tr">
						<th class="required row-title1" rowspan="<?php echo count($student) + 9 ?>">巡查记录</th>
						<th class="required row-title2" rowspan="<?php echo count($student) + 2 ?>">
							学生信息
							<i class="icon-plus-sign add-icon edit-page" onclick="addStudent()"></i>
						</th>
						<th colspan="2" style="height:30px;">专业班级</th>
						<th colspan="2" style="height:30px;">学生姓名</th>
						<th colspan="2" style="height:30px;">学生联系方式或手机</th>
					</tr>
					<?php foreach ($student as $k => $v) : ?>
						<tr class="student-tr">
							<td colspan="2"><input type="text" name="student_class_name[]" class="student_class_name edit-page" value="<?php echo $v['student_class_name'] ?>">
								<div class="print-page"><?php echo $v['student_class_name'] ?></div>
							</td>
							<td colspan="2"><input type="text" name="student_name[]" class="student_name edit-page" value="<?php echo $v['student_name'] ?>">
								<div class="print-page"><?php echo $v['student_name'] ?></div>
							</td>
							<td colspan="2" style="min-width: 200px;"><input style="width:150px;" type="text" name="contact_phone[]" class="contact_phone edit-page" value="<?php echo $v['contact_phone'] ?>">
								<div class="print-page"><?php echo $v['contact_phone'] ?></div><i class="icon-remove-sign del-icon edit-page" onclick="delStudent(this)"></i>
							</td>
						</tr>
					<?php endforeach ?>
					<tr class="student-num-tr">
						<td colspan="6">共有&nbsp;<input class="outline-none" style="width:80px; text-align: center;" type="number" name="student_num" id="student_num" value="<?php echo isset($detail['student_num']) ? estr($detail, 'student_num') : count($student) ?>">&nbsp;人在本单位实习</td>
					</tr>

					<!-- 巡查调研 -->
					<tr>
						<th class="required" rowspan="7">巡查调研</th>
						<th class="required" rowspan="7" style="max-width: 50px;">企业对学生实习情况的基本评价</th>
						<th>职业道德</th>
						<td>
							<select name="eval1" id="eval1" class="outline-none">
								<?php foreach ((new Table5Eval)->getAll() as $k => $v) : ?>
									<option value="<?php echo $v[XPHEnum::Value] ?>" <?php if (estr($detail, 'eval1') == $v[XPHEnum::Value]) echo 'selected="selected"' ?>><?php echo $v[XPHEnum::Caption] ?></option>
								<?php endforeach ?>
							</select>
						</td>
						<td colspan="3"><input class="edit-page" type="text" style="width:200px;" name="eval1_remark" id="eval1_remark" value="<?= estr($detail, 'eval1_remark') ?>" />
							<div class="print-page"><?= estr($detail, 'eval1_remark') ?></div>
						</td>
					</tr>
					<tr>
						<th>工作态度</th>
						<td>
							<select name="eval2" id="eval2" class="outline-none">
								<?php foreach ((new Table5Eval)->getAll() as $k => $v) : ?>
									<option value="<?php echo $v[XPHEnum::Value] ?>" <?php if (estr($detail, 'eval2') == $v[XPHEnum::Value]) echo 'selected="selected"' ?>><?php echo $v[XPHEnum::Caption] ?></option>
								<?php endforeach ?>
							</select>
						</td>
						<td colspan="3"><input class="edit-page" type="text" style="width:200px;" name="eval2_remark" id="eval2_remark" value="<?= estr($detail, 'eval2_remark') ?>" />
							<div class="print-page"><?= estr($detail, 'eval2_remark') ?>
						</td>
					</tr>
					<tr>
						<th>专业水平</th>
						<td>
							<select name="eval3" id="eval3" class="outline-none">
								<?php foreach ((new Table5Eval)->getAll() as $k => $v) : ?>
									<option value="<?php echo $v[XPHEnum::Value] ?>" <?php if (estr($detail, 'eval3') == $v[XPHEnum::Value]) echo 'selected="selected"' ?>><?php echo $v[XPHEnum::Caption] ?></option>
								<?php endforeach ?>
							</select>
						</td>
						<td colspan="3"><input class="edit-page" type="text" style="width:200px;" name="eval3_remark" id="eval3_remark" value="<?= estr($detail, 'eval3_remark') ?>" />
							<div class="print-page"><?= estr($detail, 'eval3_remark') ?>
						</td>
					</tr>
					<tr>
						<th>团队合作</th>
						<td>
							<select name="eval4" id="eval4" class="outline-none">
								<?php foreach ((new Table5Eval)->getAll() as $k => $v) : ?>
									<option value="<?php echo $v[XPHEnum::Value] ?>" <?php if (estr($detail, 'eval4') == $v[XPHEnum::Value]) echo 'selected="selected"' ?>><?php echo $v[XPHEnum::Caption] ?></option>
								<?php endforeach ?>
							</select>
						</td>
						<td colspan="3"><input class="edit-page" type="text" style="width:200px;" name="eval4_remark" id="eval4_remark" value="<?= estr($detail, 'eval4_remark') ?>" />
							<div class="print-page"><?= estr($detail, 'eval4_remark') ?>
						</td>
					</tr>
					<tr>
						<th>沟通能力</th>
						<td>
							<select name="eval5" id="eval5" class="outline-none">
								<?php foreach ((new Table5Eval)->getAll() as $k => $v) : ?>
									<option value="<?php echo $v[XPHEnum::Value] ?>" <?php if (estr($detail, 'eval5') == $v[XPHEnum::Value]) echo 'selected="selected"' ?>><?php echo $v[XPHEnum::Caption] ?></option>
								<?php endforeach ?>
							</select>
						</td>
						<td colspan="3"><input class="edit-page" type="text" style="width:200px;" name="eval5_remark" id="eval5_remark" value="<?= estr($detail, 'eval5_remark') ?>" />
							<div class="print-page"><?= estr($detail, 'eval5_remark') ?>
						</td>
					</tr>
					<tr>
						<th>创新能力</th>
						<td>
							<select name="eval6" id="eval6" class="outline-none">
								<?php foreach ((new Table5Eval)->getAll() as $k => $v) : ?>
									<option value="<?php echo $v[XPHEnum::Value] ?>" <?php if (estr($detail, 'eval6') == $v[XPHEnum::Value]) echo 'selected="selected"' ?>><?php echo $v[XPHEnum::Caption] ?></option>
								<?php endforeach ?>
							</select>
						</td>
						<td colspan="3"><input class="edit-page" type="text" style="width:200px;" name="eval6_remark" id="eval6_remark" value="<?= estr($detail, 'eval6_remark') ?>" />
							<div class="print-page"><?= estr($detail, 'eval6_remark') ?>
						</td>
					</tr>
					<tr>
						<th>心理素质</th>
						<td>
							<select name="eval7" id="eval7" class="outline-none">
								<?php foreach ((new Table5Eval)->getAll() as $k => $v) : ?>
									<option value="<?php echo $v[XPHEnum::Value] ?>" <?php if (estr($detail, 'eval7') == $v[XPHEnum::Value]) echo 'selected="selected"' ?>><?php echo $v[XPHEnum::Caption] ?></option>
								<?php endforeach ?>
							</select>
						</td>
						<td colspan="3"><input class="edit-page" type="text" style="width:200px;" name="eval7_remark" id="eval7_remark" value="<?= estr($detail, 'eval7_remark') ?>" />
							<div class="print-page"><?= estr($detail, 'eval7_remark') ?>
						</td>
					</tr>



					<tr>
						<th class="required" colspan="8" style="height:30px;">实习单位意见及建议</td>
					</tr>
					<tr>
						<td colspan="8" style="height:200px;">
							<script id="editor1" type="text/plain" style="height:300px; width:100%;"></script>
							<textarea name="advice" id="advice" cols="30" rows="10" style="width:100%;"><?php echo $detail['advice']; ?></textarea>
							<!-- <textarea class="outline-none" name="advice" id="advice" style="height:100%; width:100%; resize: none;"><?= estr($detail, 'advice') ?></textarea> -->
						</td>
					</tr>
					<tr>
						<th class="required" colspan="2">单位负责人或企业导师签名</th>
						<td colspan="2">
							<input class="outline-none" type="text" name="mentor_name" id="mentor_name" value="<?= estr($detail, 'mentor_name') ?>"  />
						</td>
						<th class="required" colspan="2">联系电话</th>
						<td colspan="2">
							<input class="outline-none" type="text" name="mentor_phone" id="mentor_phone" value="<?= estr($detail, 'mentor_phone') ?>"  />
						</td>
					</tr>
					<tr>
						<th class="required" colspan="2">时间</th>
						<td colspan="6">
							<input class="outline-none" type="text" name="mentor_time" id="mentor_time" value="<?php echo isset($detail['mentor_time']) && $detail['mentor_time'] != 0  ? date('Y-m-d', estr($detail, 'mentor_time')) : '' ?>" />
						</td>
					</tr>

					<tr>
						<th class="required" colspan="8" style="height:30px;">巡查情况小结</td>
					</tr>
					<tr>
						<td colspan="8" style="height:200px;">
							<script id="editor2" type="text/plain" style="height:300px; width:100%;"></script>
							<textarea name="summary" id="summary" cols="30" rows="10" style="width:100%; "><?php echo $detail['summary']; ?></textarea>
							<!-- <textarea class="outline-none" name="summary" id="summary" style="height:100%; width:100%; resize: none;"><?= estr($detail, 'summary') ?></textarea> -->
						</td>
					</tr>
					<tr>
						<th class="required" style="height:30px;">督导身份</td>
						<td colspan="8">
							<select name="AttendType" id="AttendType" class="outline-none">
								<option value="-1">督导身份</option>
								<?php foreach ($AttendType as $k => $v) : ?>
									<option value="<?= $v['key'] ?>" <?php if (estr($detail, 'AttendType') == $v['key']) echo 'selected="selected"' ?>><?php echo $v['value'] ?></option>
								<?php endforeach ?>
							</select>
						</td>
					</tr>
					<tr class="title-tr">
						<th colspan="8"><i class="icon-dashboard"></i>图片上传</th>
					</tr>
					<tr class="tab-item1">
						<td colspan="8">
							<table class='edit_table'>
								<!-- 	<tr>
									<td colspan="4" style="text-align: left!important;">
										<button class="pageItemButton" onclick="showImage(this)"><i class="icon-eye-open"></i>图片预览</button>
									</td>
								</tr> -->
								<tr>
									<td colspan="4" class="td_<?php echo UploadType::SupervisionOtherImg[XPHEnum::Value] ?>">
										<div class="data-box" class="td_<?php echo UploadType::SupervisionOtherImg[XPHEnum::Value] ?>">
											<img class="add-img" data-type="<?php echo UploadType::SupervisionOtherImg[XPHEnum::Value] ?>" src="<?php echo base_url() ?>public/home/images/add-structure.png" alt="" onclick="uploadDocument(this)">
										</div>
										<?php if (isset($SupervisionOtherImg)) : ?>
											<?php foreach ($SupervisionOtherImg as $k => $v) : ?>
												<div class="data-box data-box-banner">

													<i class="icon-remove-sign  del-icon" onclick="delDocument(this)"></i>
													<a href="<?php echo $v ?>" download=""><img src="<?php echo $v ?>" alt="" class="document-img"></a>
													<input type="hidden" name="SupervisionOtherImg" class="path" value="<?php echo $v ?>">
													<!-- <input type="hidden" name="icon[<?php echo UploadType::SupervisionOtherImg[XPHEnum::Value] ?>][]" class="icon" value="<?php echo $v['icon'] ?>"> -->

													<!-- 前后 -->
													<div class="banner-prev" onclick="bannerPrev(this)"><i class="fa fa-angle-left" aria-hidden="true"></i></div>
													<div class="banner-next" onclick="bannerNext(this)"><i class="fa fa-angle-right" aria-hidden="true"></i></div>
												</div>
											<?php endforeach ?>
										<?php endif; ?>

										<!-- 文件上传进度条 -->
										<div class="document-p">
											<div class="clearfix">
												<div class="col-xs-12 p-text" style="font-size: 12px; font-weight:bold; margin-bottom: 5px;">已上传（0%）</div>
											</div>

											<div class="progress progress-mini progress-striped active">
												<div style="width:0%" class="progress-bar progress-bar-success"></div>
											</div>
										</div>
									</td>
								</tr>
							</table>
						</td>
					</tr>

				</table>
			</form>
			<div class="viewContent">
				<!--这是显示具体车辆信息情况的。-->
			</div>
		</div>
	</div>
</body>

</html>